package report.dao.vo.tree;

import report.dao.po.ReportTreeDO;

import java.util.List;

public class TreeVO {
    private String name;
    private String id;
    private String pid;
//    private String typeCode;
    private List<TreeVO> children;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public List<TreeVO> getChildren() {
        return children;
    }

    public void setChildren(List<TreeVO> children) {
        this.children = children;
    }

    public String getPid() {
        return pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

//    public String getTypeCode() {
//        return typeCode;
//    }
//
//    public void setTypeCode(String typeCode) {
//        this.typeCode = typeCode;
//    }

    public static TreeVO do2vo(ReportTreeDO datao) {
        if (datao == null) {
            return null;
        }
        TreeVO treeVO = new TreeVO();
        treeVO.setId(datao.getId());
        treeVO.setName(datao.getName());
        treeVO.setPid(datao.getPid());
        return treeVO;
    }
}
